home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Controls / Visual Basic Controls.iso / vbcontrol / cstwnd / bar.h next >
C/C++ Source or Header  |  1994-01-02  |  2KB  |  69 lines

  1. #ifndef _BAR_H_
  2. #define _BAR_H_
  3.  
  4. #include "custwind.h"
  5.  
  6. _CLASSDEF(TBarWindows)
  7. class _EXPORT TBarWindows : virtual public TUnderlying
  8. {
  9. public:
  10.     TBarWindows(PCustColors SomeColors, PCustCursors
  11.         SomeCursors)
  12.         : TUnderlying(SomeColors, SomeCursors)
  13.         { };
  14.  
  15.    //Only need to draw the frame and title
  16.     virtual void UserFrame(HDC DrawDC);
  17.     virtual void UserTitle(HDC DrawDC);
  18.  
  19. protected:
  20.     virtual LPSTR GetClassName()
  21.         { return (LPSTR)"BARWINDOW"; };
  22. };
  23.  
  24. /*******************************************************************
  25. The following will create two new classes, one to create
  26. Dialogs and the Other for Windows.  This isn't hard to
  27. do because the major chunk can just be cut from the
  28. CUSTWIND.H header file and change the names.
  29. *******************************************************************/
  30.  
  31. _CLASSDEF(TBarDialog)
  32. class TBarDialog : public TCustomDialog,
  33.     public TBarWindows
  34. {
  35. public:
  36.     TBarDialog(PTWindowsObject AParent, LPSTR AName,
  37.         PCustColors Colors, PCustCursors Cursors,
  38.         PTModule AModule = NULL)
  39.         : TCustomDialog(AParent, AName, Colors, Cursors,
  40.           AModule) ,
  41.          TBarWindows(Colors, Cursors),
  42.          TUnderlying(Colors, Cursors) {};
  43.     TBarDialog(PTWindowsObject AParent, int ResourceId,
  44.         PCustColors Colors, PCustCursors Cursors,
  45.         PTModule AModule = NULL)
  46.         : TBarWindows(Colors, Cursors),
  47.          TUnderlying(Colors, Cursors),
  48.          TCustomDialog(AParent, ResourceId, Colors, Cursors,
  49.           AModule) { };
  50. };
  51.  
  52. _CLASSDEF(TBarWindow)
  53. class TBarWindow : public TCustomWindow,
  54.     public TBarWindows
  55. {
  56. public:
  57.     TBarWindow(PTWindowsObject AParent, LPSTR ATitle,
  58.         PCustColors Colors, PCustCursors Cursors,
  59.         PTModule AModule = NULL)
  60.         : TCustomWindow(AParent, ATitle, Colors, Cursors,
  61.             AModule),
  62.         TUnderlying(Colors, Cursors),
  63.         TBarWindows(Colors, Cursors) {};
  64. };
  65.  
  66.  
  67. #endif //_BAR_H_
  68.  
  69.